<template></template>

<script>
import Driver from "driver.js"; // import driver.js
import "driver.js/dist/driver.min.css"; // import driver.js css
import steps from "../assets/js/steps";

export default {
  name: "Guide",
  data() {
    return {
      driver: null,
    };
  },
  mounted() {
    this.guide();
  },
  methods: {
    guide() {
      this.$nextTick(function () {
        this.driver = new Driver({
          doneBtnText: "完成", // 结束按钮的文字
          animate: true, // 动画
          allowClose: false,
          stageBackground: "#ffffff", // 突出显示元素的背景颜色
          nextBtnText: "下一步", // 下一步按钮的文字
          prevBtnText: "上一步", // 上一步按钮的文字
          closeBtnText: "关闭", // 关闭按钮的文字
        });
        this.driver.defineSteps(steps);
        this.driver.start();
      });
    },
  },
};
</script>

<style>
</style>